<?php
require_once 'class/booking.class.php';
//require_once 'class/user.class.php';
/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
if(isset($_POST["book"]))
{
    $robotID = 1;
    $bookingTime = $_POST["book"];

//        $user =  new User("3", "zhang1159", "zhang1159", "zhang1159@gmail.com");

//        print_r($user);
//        print_r($user);

    session_start();
    $user = unserialize($_SESSION['user']);
    session_write_close();

    $userID = $user->userID;

    Booking::addBooking($userID, $robotID, $bookingTime);
}
else
{
    echo "No submit!!!";
}

?>